package com.zwz.conf;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.zwz.resp.EnterpriseContactResponse;

public class ContactParserConfig {
    private static final ObjectMapper mapper = new ObjectMapper();

    static {
      //  mapper.registerModule(new JavaTimeModule());
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    }

    public static EnterpriseContactResponse parse(String json) throws Exception {
        return mapper.readValue(json, EnterpriseContactResponse.class);
    }
}